<!DOCTYPE html>
<html lang="zh">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <link href="../css/style.css" rel="stylesheet">
</head>

<body>
    <div id="myApp">
        <my-weather></my-weather>
    </div>
    <script>
        // todo ：父子组件测试
         var sonComponent = {
            template: '<div>子组件</div>'
        };

        var WeatherComponent = {
            template: `
             <div>
                今天下雨，随它去吧！
                <br/>
                <son></son>
            </div>
            `,
            components: {
                son: sonComponent,
            },
        };
       
        var myApp = new Vue({
            el: '#myApp',
            data: {
            },
            components: {
                'my-weather': WeatherComponent
            },
        });
    </script>
</body>

</html>